package com.mifengs.mall.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mifengs.mall.R;
import com.mifengs.mall.entity.AdvertBean;
import com.mifengs.mall.entity.MenuBean;
import com.mifengs.mall.util.ImageLoadUtil;

/**
 * Created by lihaoqi on 2017/11/1.
 */

public class ClassifyRvHorizontalAdapter extends BaseQuickAdapter<AdvertBean,BaseViewHolder> {



    public ClassifyRvHorizontalAdapter() {
        super(R.layout.item_classify_horizontal);
    }


    public ClassifyRvHorizontalAdapter(int i) {
        super(R.layout.item_classify_horizontal_four);
    }

    @Override
    protected void convert(BaseViewHolder helper, AdvertBean item) {
        helper.setText(R.id.tv_name,item.getText());
        ImageView ivImg = helper.getView(R.id.iv_img);
        ImageLoadUtil.displayImage(mContext,item.getImg(),ivImg);
    }
}
